//
//  about.swift
//  uiKit-demo
//
//  Created by 陈澎 on 2025/1/6.
//
import UIKit
class AboutPageControl: UIViewController {
    //定义传过来的数据
    var data:String?
    override func viewDidLoad() {
        super.viewDidLoad()
        // 添加返回按钮
        self.view.backgroundColor = .green
        let backBtn = UIButton()
        backBtn.frame = CGRect(x: 20, y: 30, width: 100, height: 40)
        backBtn.setTitle("返回", for: .normal)
        backBtn.addTarget(self, action: #selector(goBack), for: .touchUpInside)
        self.view.addSubview(backBtn)
        let label = UILabel()
        label.frame = CGRect(x: 20, y: 60, width: 100, height: 40)
        label.text = self.data
        label.textColor = .red
        label.font = UIFont.systemFont(ofSize: 30, weight: .bold)
        self.view.addSubview(label)
    }
    @objc func goBack() {
        print("返回")
        self.dismiss(animated: true)
    }
}
